package cn.cheegon.blog.controller;

import cn.cheegon.blog.common.api.CommonResult;
import cn.cheegon.blog.entity.rsp.CountBlogRsp;
import cn.cheegon.blog.service.AdminHomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Desc:
 * @Author: cheegon
 * @Date: Create in 2024/7/3  下午4:41
 */
@RestController
@RequestMapping("/admin/home/*")
public class AdminHomeController {
    @Autowired
    AdminHomeService adminHomeService;
    @RequestMapping("countBlog")
    public CommonResult<CountBlogRsp> countBlog() {
        return CommonResult.success(adminHomeService.countBlog());
    }
}
